'use strict';

const Controller = require('egg').Controller;

class TestController extends Controller {
  async md5() {
    const { ctx } = this;

    const pwd = ctx.helper.md5('123456');
    ctx.body = pwd;

    //this.ctx.model.User.findOne({
    ctx.model.User.create({
        account: 'admin',
        role: 1,
        password: pwd,
        name: 'cadcamzy',
        email: 'cadcamzy@hotmail.com',
        
    })
  }

}

module.exports = TestController;
